 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.
 
 #<tag> = {
 #	desc = description used in the tooltip of the building
 #	trigger = used for tech requirement of the building, set to 0 if no requirement so it can be build automatically on new games
 #	build_cost = cost to build the building
 #	build_time = time to build, in days
 #	
 #	ai_creation_factor = weight that the AI uses to determine what building to build
 #	extra_tech_building_start = when starting a new game this building will be pre-built if the province has higher tech than the requirement + this + random 0-1
 #}

# City
city = {
	ct_wall_q_1 = {
		desc = ct_wall_q_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
		prerequisites = { ct_wall_1 }
		build_cost = 50
		build_time = 182
		fort_level = 0.4
		ai_creation_factor = 60
		
		extra_tech_building_start = 2.0
	}
	ct_wall_q_2 = {
		desc = ct_wall_q_2_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 1 }
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_wall_q_1
		build_cost = 50
		build_time = 182
		fort_level = 0.4
		ai_creation_factor = 59

		extra_tech_building_start = 2.0
	}	
	ct_wall_q_3 = {
		desc = ca_wall_q_3_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 3 }
		upgrades_from = ct_wall_q_2
		build_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 58

		extra_tech_building_start = 2.0
	}
	ct_wall_q_4 = {
		desc = ca_wall_q_4_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 5 }
		upgrades_from = ct_wall_q_3
		build_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 57

		extra_tech_building_start = 2.0
	}
	ct_wall_q_5 = {
		desc = ca_wall_q_5_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 7 }
		upgrades_from = ct_wall_q_4
		build_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 56

		extra_tech_building_start = 2.0
	}

	ct_wall_1 = {
		desc = ca_wall_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
		build_cost = 50
		build_time = 365
		fort_level = 0.4
		levy_size = 0.025
		tax_income = 0.2
		ai_creation_factor = 99
		
		extra_tech_building_start = 2.0
	}
	ct_wall_2 = {
		desc = ca_wall_2_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 2 }
		upgrades_from = ct_wall_1
		build_cost = 50
		build_time = 547
		fort_level = 0.4
		levy_size = 0.025
		tax_income = 0.2
		ai_creation_factor = 98

		extra_tech_building_start = 2.0
	}
	ct_wall_3 = {
		desc = ct_wall_3_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 4 }
		upgrades_from = ct_wall_2
		build_cost = 100
		build_time = 730
		fort_level = 0.4
		levy_size = 0.05
		tax_income = 0.2
		ai_creation_factor = 97

		extra_tech_building_start = 2.0
	}
	ct_wall_4 = {
		desc = ct_wall_4_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 6 }
		upgrades_from = ct_wall_3
		build_cost = 100
		build_time = 1095
		fort_level = 0.5
		levy_size = 0.05
		tax_income = 0.2
		ai_creation_factor = 96

		extra_tech_building_start = 2.0
	}
	ct_wall_5 = {
		desc = ct_wall_5_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 8 }
		upgrades_from = ct_wall_4
		build_cost = 150
		build_time = 1460
		fort_level = 1.0
		levy_size = 0.075
		tax_income = 0.5
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	
	# Merchant Republic Arsenal
	ct_rep_arsenal_1 = {
		potential = {
			FROM = { 
				AND = {
					capital_holding = {
						title = FROMFROM
					}
					is_merchant_republic = yes
				}
			}
		}
		trigger = { TECH_CITY_CONSTRUCTION = 0 }
		desc = ct_rep_arsenal_1_desc
		build_cost = 200
		build_time = 1460
		fort_level = 1.0
		garrison_size = 0.25
		levy_size = 0.075
		galleys = 15
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	ct_rep_arsenal_2 = {
		potential = {
			FROM = { 
				AND = {
					capital_holding = {
						title = FROMFROM
					}
					is_merchant_republic = yes
				}
			}
		}
		upgrades_from = ct_rep_arsenal_1
		trigger = { TECH_CITY_CONSTRUCTION = 4 }
		desc = ct_rep_arsenal_2_desc
		build_cost = 400
		build_time = 1460
		fort_level = 1.5
		garrison_size = 0.2
		levy_size = 0.075
		galleys = 15
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	ct_rep_arsenal_3 = {
		potential = {
			FROM = { 
				AND = {
					capital_holding = {
						title = FROMFROM
					}
					is_merchant_republic = yes
				}
			}
		}
		upgrades_from = ct_rep_arsenal_2
		trigger = { TECH_CITY_CONSTRUCTION = 7 }
		desc = ct_rep_arsenal_3_desc
		build_cost = 600
		build_time = 2190
		fort_level = 2.0
		garrison_size = 0.25
		levy_size = 0.125
		galleys = 15
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	
	ct_training_grounds_1 = {
		desc = ct_training_grounds_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 547
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 98

		extra_tech_building_start = 2.0
	}
	ct_training_grounds_2 = {
		desc = ct_training_grounds_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_training_grounds_1
		build_cost = 200
		build_time = 730
		levy_size = 0.075
		garrison_size = 0.1
		ai_creation_factor = 97

		extra_tech_building_start = 2.0
	} 
	ct_training_grounds_3 = {
		desc = ct_training_grounds_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 2 }
		upgrades_from = ct_training_grounds_2
		build_cost = 300
		build_time = 1095
		levy_size = 0.1
		garrison_size = 0.15
		ai_creation_factor = 96

		extra_tech_building_start = 2.0
	} 
	ct_training_grounds_4 = {
		desc = ct_training_grounds_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 4 }
		upgrades_from = ct_training_grounds_3
		build_cost = 400
		build_time = 1460
		levy_size = 0.125
		garrison_size = 0.2
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	} 
	ct_training_grounds_5 = {
		desc = ct_training_grounds_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 6 }
		upgrades_from = ct_training_grounds_4
		build_cost = 500
		build_time = 2190
		levy_size = 0.15
		garrison_size = 0.25
		ai_creation_factor = 94

		extra_tech_building_start = 2.0
	}
	ct_training_grounds_6 = {
		desc = ct_training_grounds_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 8 }
		upgrades_from = ct_training_grounds_5
		build_cost = 500
		build_time = 2190
		levy_size = 0.15
		garrison_size = 0.25
		ai_creation_factor = 93

		extra_tech_building_start = 2.0
	}
	
	ct_barracks_1 = {
		desc = ct_barracks_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		light_infantry = 60
		archers = 30
		ai_creation_factor = 95
		
		extra_tech_building_start = 2.0
	}
	ct_barracks_2 = {
		desc = ct_barracks_2_desc
		trigger = { TECH_CITY_CONSTRUCTION = 0 }
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_barracks_1
		build_cost = 120
		build_time = 547
		light_infantry = 40
		archers = 70
		ai_creation_factor = 94

		extra_tech_building_start = 2.0
	}
	ct_barracks_3 = {
		desc = ct_barracks_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 1 }
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_barracks_2
		build_cost = 200
		build_time = 730
		light_infantry = 80
		archers = 50
		ai_creation_factor = 93

		extra_tech_building_start = 2.0
	}
	ct_barracks_4 = {
		desc = ct_barracks_2_desc
		trigger = { TECH_CITY_CONSTRUCTION = 3 }
		upgrades_from = ct_barracks_3
		build_cost = 300
		build_time = 1095
		light_infantry = 60
		archers = 90
		ai_creation_factor = 92

		extra_tech_building_start = 2.0
	}
	ct_barracks_5 = {
		desc = ct_barracks_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 5 }
		upgrades_from = ct_barracks_4
		build_cost = 400
		build_time = 2190
		light_infantry = 100
		archers = 70
		ai_creation_factor = 91

		extra_tech_building_start = 2.0
	}
	ct_barracks_6 = {
		desc = ct_barracks_2_desc
		trigger = { TECH_CITY_CONSTRUCTION = 7 }
		upgrades_from = ct_barracks_5
		build_cost = 500
		build_time = 2190
		light_infantry = 80
		archers = 110
		ai_creation_factor = 90

		extra_tech_building_start = 2.0
	}
	
	ct_guard_1 = {
		desc = ct_guard_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		pikemen = 45
		ai_creation_factor = 96
		
		extra_tech_building_start = 2.0
	}
	ct_guard_2 = {
		desc = ct_guard_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 2 }
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_guard_1
		build_cost = 120
		build_time = 547
		pikemen = 55
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	ct_guard_3 = {
		desc = ct_guard_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 4 }
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_guard_2
		build_cost = 200
		build_time = 730
		pikemen = 65
		ai_creation_factor = 94
		
		extra_tech_building_start = 2.0
	}
	ct_guard_4 = {
		desc = ct_guard_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 6 }
		upgrades_from = ct_guard_3
		build_cost = 300
		build_time = 1095
		pikemen = 75
		ai_creation_factor = 93
		
		extra_tech_building_start = 2.0
	}
	ct_guard_5 = {
		desc = ct_guard_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 8 }
		upgrades_from = ct_guard_4
		build_cost = 400
		build_time = 2190
		pikemen = 85
		ai_creation_factor = 92

		extra_tech_building_start = 2.0
	}
	
	ct_marketplace_1 = {
		desc = ct_marketplace_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		tax_income = 3
		ai_creation_factor = 110
		add_number_to_name = no
		
		extra_tech_building_start = 2.0
	}
	ct_marketplace_2 = {
		desc = ct_marketplace_2_desc
		prerequisites = { ct_wall_1 }
		trigger = { TECH_CITY_CONSTRUCTION = 0 }
		upgrades_from = ct_marketplace_1
		build_cost = 120
		build_time = 547
		tax_income = 3
		ai_creation_factor = 109
		add_number_to_name = no

		extra_tech_building_start = 2.0
	}
	ct_marketplace_3 = {
		desc = ct_marketplace_3_desc
		trigger = { TECH_CITY_CONSTRUCTION = 1 }
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_marketplace_2
		build_cost = 200
		build_time = 730
		tax_income = 3
		ai_creation_factor = 108
		add_number_to_name = no

		extra_tech_building_start = 2.0
	}
	ct_marketplace_4 = {
		desc = ct_marketplace_4_desc
		trigger = { TECH_CITY_CONSTRUCTION = 3 }
		upgrades_from = ct_marketplace_3
		build_cost = 300
		build_time = 1095
		tax_income = 3
		ai_creation_factor = 107
		add_number_to_name = no

		extra_tech_building_start = 2.0
	}
	ct_marketplace_5 = {
		desc = ct_marketplace_5_desc
		trigger = { TECH_CITY_CONSTRUCTION = 5 }
		upgrades_from = ct_marketplace_4
		build_cost = 400
		build_time = 2190
		tax_income = 3
		ai_creation_factor = 106
		add_number_to_name = no

		extra_tech_building_start = 2.0
	}
	ct_marketplace_6 = {
		desc = ct_marketplace_6_desc
		trigger = { TECH_CITY_CONSTRUCTION = 7 }
		upgrades_from = ct_marketplace_5
		build_cost = 500
		build_time = 2190
		tax_income = 3
		ai_creation_factor = 105
		add_number_to_name = no

		extra_tech_building_start = 2.0
	}
	
	ct_port_1 = {
		desc = ct_port_1_desc
		port = yes
		trigger = { TECH_TRADE_PRACTICES = 0 }
		build_cost = 100
		build_time = 365
		tax_income = 3
		ai_creation_factor = 110
		
		extra_tech_building_start = 2.0
	}
	ct_port_2 = {
		desc = ct_port_1_desc
		port = yes
		trigger = { TECH_TRADE_PRACTICES = 1 }
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_port_1
		build_cost = 120
		build_time = 547
		tax_income = 3
		ai_creation_factor = 109

		extra_tech_building_start = 2.0
	}
	ct_port_3 = {
		desc = ct_port_1_desc
		port = yes
		trigger = { TECH_TRADE_PRACTICES = 3 }
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_port_2
		build_cost = 200
		build_time = 730
		tax_income = 3
		ai_creation_factor = 108

		extra_tech_building_start = 2.0
	}
	ct_port_4 = {
		desc = ct_port_1_desc
		port = yes
		trigger = { TECH_TRADE_PRACTICES = 4 }
		upgrades_from = ct_port_3
		build_cost = 300
		build_time = 1095
		tax_income = 3
		ai_creation_factor = 107

		extra_tech_building_start = 2.0
	}
	ct_port_5 = {
		desc = ct_port_1_desc
		port = yes
		trigger = { TECH_TRADE_PRACTICES = 6 }
		upgrades_from = ct_port_4
		build_cost = 400
		build_time = 2190
		tax_income = 3
		ai_creation_factor = 106

		extra_tech_building_start = 2.0
	}
	
	ct_shipyard_1 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 1 }
		build_cost = 100
		build_time = 365
		galleys = 5
		ai_creation_factor = 98
		
		extra_tech_building_start = 2.0
	}
	
	ct_shipyard_2 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 2 }
		upgrades_from = ct_shipyard_1
		build_cost = 100
		build_time = 730
		galleys = 6
		ai_creation_factor = 97
		
		extra_tech_building_start = 2.0
	}
	
	ct_shipyard_3 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 3 }
		upgrades_from = ct_shipyard_2
		build_cost = 100
		build_time = 1095
		galleys = 7
		ai_creation_factor = 96
		
		extra_tech_building_start = 2.0
	}
	
	ct_shipyard_4 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 4 }
		upgrades_from = ct_shipyard_3
		build_cost = 100
		build_time = 1460
		galleys = 8
		ai_creation_factor = 95
		
		extra_tech_building_start = 2.0
	}

	ct_university_1 = {
		desc = ct_university_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 2 }
		build_cost = 600
		build_time = 1095
		
		tech_growth_modifier = 0.3
		economy_techpoints = 0.05
		
		ai_creation_factor = 90

		extra_tech_building_start = 2.0
	}
	ct_university_2 = {
		desc = ct_university_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 4 }
		upgrades_from = ct_university_1
		build_cost = 800
		build_time = 2190
		
		tech_growth_modifier = 0.3
		economy_techpoints = 0.05
		
		ai_creation_factor = 89

		extra_tech_building_start = 2.0
	}
	ct_university_3 = {
		desc = ct_university_1_desc
		trigger = { TECH_CITY_CONSTRUCTION = 8 }
		upgrades_from = ct_university_2
		build_cost = 800
		build_time = 2190
		
		tech_growth_modifier = 0.3
		economy_techpoints = 0.05
		
		ai_creation_factor = 88

		extra_tech_building_start = 2.0
	}
}


# Temple
temple = {
	tp_wall_q_1 = {	
		desc = tp_wall_q_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
		prerequisites = { tp_wall_1 }
		build_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 82
		
		extra_tech_building_start = 2.0
	}
	tp_wall_q_2 = {
		desc = tp_wall_q_2_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 1 }
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_wall_q_1
		build_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 81

		extra_tech_building_start = 2.0
	}	
	tp_wall_q_3 = {
		desc = ca_wall_q_3_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 3 }
		upgrades_from = tp_wall_q_2
		build_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 80

		extra_tech_building_start = 2.0
	}
	tp_wall_q_4 = {
		desc = ca_wall_q_4_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 5 }
		upgrades_from = tp_wall_q_3
		build_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 79

		extra_tech_building_start = 2.0
	}
	tp_wall_q_5 = {
		desc = ca_wall_q_5_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 7 }
		upgrades_from = tp_wall_q_4
		build_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 78

		extra_tech_building_start = 2.0
	}

	tp_wall_1 = {
		desc = ca_wall_1_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 0 }
		build_cost = 50
		build_time = 365
		fort_level = 0.5
		levy_size = 0.025
		tax_income = 0.2
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	tp_wall_2 = {
		desc = ca_wall_2_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 2 }
		upgrades_from = tp_wall_1
		build_cost = 50
		build_time = 547
		fort_level = 0.5
		levy_size = 0.025
		tax_income = 0.2
		ai_creation_factor = 94

		extra_tech_building_start = 2.0
	}
	tp_wall_3 = {
		desc = tp_wall_3_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 4 }
		upgrades_from = tp_wall_2
		build_cost = 100
		build_time = 730
		fort_level = 1.0
		levy_size = 0.05
		tax_income = 0.2
		ai_creation_factor = 93

		extra_tech_building_start = 2.0
	}
	tp_wall_4 = {
		desc = tp_wall_4_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 6 }
		upgrades_from = tp_wall_3
		build_cost = 100
		build_time = 1095
		fort_level = 1.0
		levy_size = 0.05
		tax_income = 0.2
		ai_creation_factor = 92

		extra_tech_building_start = 2.0
	}
	tp_wall_5 = {
		desc = tp_wall_5_desc
		trigger = { TECH_FORTIFICATIONS_CONSTRUCTION = 8 }
		upgrades_from = tp_wall_4
		build_cost = 150
		build_time = 1460
		fort_level = 1.5
		levy_size = 0.075
		tax_income = 0.5
		ai_creation_factor = 91

		extra_tech_building_start = 2.0
	}

	tp_monastery_1 = {
		desc = tp_monastery_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 547
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 96
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 2.0
	}
	tp_monastery_2 = {
		desc = tp_monastery_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_monastery_1
		build_cost = 200
		build_time = 730
		levy_size = 0.075
		garrison_size = 0.1
		ai_creation_factor = 95
		add_number_to_name = no
		liege_piety = 0.05
		
		extra_tech_building_start = 2.0
	} 
	tp_monastery_3 = {
		desc = tp_monastery_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 2 }
		upgrades_from = tp_monastery_2
		build_cost = 300
		build_time = 1095
		levy_size = 0.1
		garrison_size = 0.15
		ai_creation_factor = 94
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 2.0
	} 
	tp_monastery_4 = {
		desc = tp_monastery_2_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 4 }
		upgrades_from = tp_monastery_3
		build_cost = 400
		build_time = 1460
		levy_size = 0.125
		garrison_size = 0.2
		ai_creation_factor = 93
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 2.0
	} 
	tp_monastery_5 = {
		desc = tp_monastery_2_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 6 }
		upgrades_from = tp_monastery_4
		build_cost = 500
		build_time = 2190
		levy_size = 0.15
		garrison_size = 0.25
		ai_creation_factor = 92
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 2.0
	}
	tp_monastery_6 = {
		desc = tp_monastery_2_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 8 }
		upgrades_from = tp_monastery_5
		build_cost = 500
		build_time = 2190
		levy_size = 0.15
		garrison_size = 0.25
		ai_creation_factor = 91
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 2.0
	}
	
	tp_barracks_1 = {
		desc = tp_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		light_infantry = 60
		archers = 30
		ai_creation_factor = 94

		extra_tech_building_start = 2.0
	}
	tp_barracks_2 = {
		desc = tp_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_barracks_1
		build_cost = 120
		build_time = 547
		light_infantry = 65
		archers = 45
		ai_creation_factor = 93

		extra_tech_building_start = 2.0
	}
	tp_barracks_3 = {
		desc = tp_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 1 }
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_barracks_2
		build_cost = 200
		build_time = 730
		light_infantry = 70
		archers = 60
		ai_creation_factor = 92

		extra_tech_building_start = 2.0
	}
	tp_barracks_4 = {
		desc = tp_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 3 }
		upgrades_from = tp_barracks_3
		build_cost = 300
		build_time = 1095
		light_infantry = 75
		archers = 75
		ai_creation_factor = 91

		extra_tech_building_start = 2.0
	}
	tp_barracks_5 = {
		desc = tp_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 5 }
		upgrades_from = tp_barracks_4
		build_cost = 400
		build_time = 2190
		light_infantry = 85
		archers = 85
		ai_creation_factor = 90

		extra_tech_building_start = 2.0
	}
	tp_barracks_6 = {
		desc = tp_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 7 }
		upgrades_from = tp_barracks_5
		build_cost = 500
		build_time = 2190
		light_infantry = 95
		archers = 95
		ai_creation_factor = 89

		extra_tech_building_start = 2.0
	}
	
	tp_elite_barracks_1 = {
		desc = tp_elite_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		heavy_infantry = 45
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	tp_elite_barracks_2 = {
		desc = tp_elite_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_elite_barracks_1
		build_cost = 120
		build_time = 730
		heavy_infantry = 55
		ai_creation_factor = 94

		extra_tech_building_start = 2.0
	}
	tp_elite_barracks_3 = {
		desc = tp_elite_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 2 }
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_elite_barracks_2
		build_cost = 200
		build_time = 730
		heavy_infantry = 65
		ai_creation_factor = 93

		extra_tech_building_start = 2.0
	}
	tp_elite_barracks_4 = {
		desc = tp_elite_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 4 }
		upgrades_from = tp_elite_barracks_3
		build_cost = 300
		build_time = 1095
		heavy_infantry = 75
		ai_creation_factor = 92

		extra_tech_building_start = 2.0
	}
	tp_elite_barracks_5 = {
		desc = tp_elite_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 6 }
		upgrades_from = tp_elite_barracks_4
		build_cost = 400
		build_time = 2190
		heavy_infantry = 85
		ai_creation_factor = 91

		extra_tech_building_start = 2.0
	}
	tp_elite_barracks_6 = {
		desc = tp_elite_barracks_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 8 }
		upgrades_from = tp_elite_barracks_5
		build_cost = 500
		build_time = 2190
		heavy_infantry = 95
		ai_creation_factor = 90

		extra_tech_building_start = 2.0
	}
	
	tp_town_1 = {
		desc = tp_town_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		build_cost = 100
		build_time = 365
		tax_income = 2
		ai_creation_factor = 98

		extra_tech_building_start = 2.0
	}
	tp_town_2 = {
		desc = tp_town_2_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 0 }
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_town_1
		build_cost = 120
		build_time = 547
		tax_income = 2
		ai_creation_factor = 96

		extra_tech_building_start = 2.0
	}
	tp_town_3 = {
		desc = tp_town_3_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 1 }
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_town_2
		build_cost = 200
		build_time = 730
		tax_income = 2
		ai_creation_factor = 95

		extra_tech_building_start = 2.0
	}
	tp_town_4 = {
		desc = tp_town_4_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 3 }
		upgrades_from = tp_town_3
		build_cost = 300
		build_time = 1095
		tax_income = 2
		ai_creation_factor = 94

		extra_tech_building_start = 2.0
	}
	tp_town_5 = {
		desc = tp_town_4_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 5 }
		upgrades_from = tp_town_4
		build_cost = 400
		build_time = 2190
		tax_income = 2
		ai_creation_factor = 93

		extra_tech_building_start = 2.0
	}
	tp_town_6 = {
		desc = tp_town_5_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 7 }
		upgrades_from = tp_town_5
		build_cost = 500
		build_time = 2190
		tax_income = 2
		ai_creation_factor = 92

		extra_tech_building_start = 2.0
	}
	
	tp_shipyard_1 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 1 }
		build_cost = 100
		build_time = 365
		galleys = 4
		ai_creation_factor = 87
		
		extra_tech_building_start = 2.0
	}
	
	tp_shipyard_2 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 2 }
		upgrades_from = tp_shipyard_1
		build_cost = 100
		build_time = 730
		galleys = 5
		ai_creation_factor = 86
		
		extra_tech_building_start = 2.0
	}
	
	tp_shipyard_3 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 3 }
		upgrades_from = tp_shipyard_2
		build_cost = 100
		build_time = 1095
		galleys = 6
		ai_creation_factor = 85
		
		extra_tech_building_start = 2.0
	}
	
	tp_shipyard_4 = {
		desc = shipyard_desc
		port = yes
		trigger = { TECH_NAVAL = 4 }
		upgrades_from = tp_shipyard_3
		build_cost = 100
		build_time = 1460
		galleys = 7
		ai_creation_factor = 84
		
		extra_tech_building_start = 2.0
	}

	tp_school_1 = {
		desc = tp_school_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 3 }
		prerequisites = { tp_wall_1 }
		build_cost = 120
		build_time = 547
		
		tech_growth_modifier = 0.1
		culture_techpoints = 0.04
		
		ai_creation_factor = 93
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 2.0
	}
	tp_school_2 = {
		desc = tp_school_1_desc
		trigger = { TECH_TEMPLE_CONSTRUCTION = 6 }
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_school_1
		build_cost = 120
		build_time = 547
		
		tech_growth_modifier = 0.2
		culture_techpoints = 0.04
		
		ai_creation_factor = 92
		add_number_to_name = no
		liege_piety = 0.05
		
		extra_tech_building_start = 2.0
	}
}

family_palace = {

	# Mansion
	fp_mansion_1 = {
		desc = fp_mansion_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 200
		build_time = 1095
		ai_creation_factor = 105
		
		levy_size = 0.1
		tax_income = 2
		
		extra_tech_building_start = 0.0
	}
	
	# Great Mansion
	fp_mansion_2 = {
		desc = fp_mansion_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		upgrades_from = fp_mansion_1
		build_cost = 300
		build_time = 1460
		ai_creation_factor = 104
		
		levy_size = 0.2
		tax_income = 6
		max_tradeposts = 3
		
		extra_tech_building_start = 2.0
	}
	
	# Palace
	fp_mansion_3 = {
		desc = fp_mansion_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		upgrades_from = fp_mansion_2
		build_cost = 400
		build_time = 2190
		ai_creation_factor = 103
		
		levy_size = 0.3
		tax_income = 8
		max_tradeposts = 3
		
		extra_tech_building_start = 3.5
	}
	
	# Grand Palace
	fp_mansion_4 = {
		desc = fp_mansion_4_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		upgrades_from = fp_mansion_3
		build_cost = 500
		build_time = 2190
		ai_creation_factor = 102
		
		levy_size = 0.4
		tax_income = 10
		max_tradeposts = 3
		
		extra_tech_building_start = 5.0
	}
	
	# Guard Barracks
	fp_barracks_1 = {
		desc = fp_barracks_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		heavy_infantry = 70
		pikemen = 50
		
		extra_tech_building_start = 1.0
	}
	
	# Swordsmith
	fp_barracks_2 = {
		desc = fp_barracks_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		upgrades_from = fp_barracks_1
		prerequisites = { fp_mansion_2 }
		build_cost = 250
		build_time = 1095
		ai_creation_factor = 99
		
		heavy_infantry = 85
		pikemen = 65
		
		extra_tech_building_start = 2.5
	}
	
	# Armory
	fp_barracks_3 = {
		desc = fp_barracks_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		upgrades_from = fp_barracks_2
		prerequisites = { fp_mansion_3 }
		build_cost = 350
		build_time = 1460
		ai_creation_factor = 98
		
		heavy_infantry = 100
		pikemen = 80
		
		extra_tech_building_start = 4.0
	}
	
	# Small Stable
	fp_stable_1 = {
		desc = fp_stable_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		light_cavalry = 75
		
		extra_tech_building_start = 1.0
	}
	
	# Riding Grounds
	fp_stable_2 = {
		desc = fp_stable_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		upgrades_from = fp_stable_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 99
		
		light_cavalry = 90
		
		extra_tech_building_start = 2.5
	}
	
	# Horse Breeder
	fp_stable_3 = {
		desc = fp_stable_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		upgrades_from = fp_stable_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 98
		
		light_cavalry = 105
		knights = 45
		
		extra_tech_building_start = 4.0
	}
	
	# Bowyer
	fp_bowyer_1 = {
		desc = fp_bowyer_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		light_infantry = 95
		archers = 95
		
		extra_tech_building_start = 1.0
	}
	
	# Target Range
	fp_bowyer_2 = {
		desc = fp_bowyer_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		upgrades_from = fp_bowyer_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 99
		
		light_infantry = 110
		archers = 110
		
		extra_tech_building_start = 2.5
	}
	
	# Crossbow Workshop
	fp_bowyer_3 = {
		desc = fp_bowyer_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		upgrades_from = fp_bowyer_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 98
		
		light_infantry = 120
		archers = 120
		
		extra_tech_building_start = 4.0
	}
	
	# Map Room
	fp_shipyard_1 = {
		desc = fp_shipyard_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		galleys = 12
		
		extra_tech_building_start = 1.0
	}
	
	#  Private Shipyard
	fp_shipyard_2 = {
		desc = fp_shipyard_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		upgrades_from = fp_shipyard_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 99
		
		galleys = 18
		
		extra_tech_building_start = 2.5
	}
	
	# Naval Arsenal
	fp_shipyard_3 = {
		desc = fp_shipyard_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		upgrades_from = fp_shipyard_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 98
		
		galleys = 24
		
		extra_tech_building_start = 4.0
	}
	
	# Military Warehouse
	fp_warehouse_1 = {
		desc = fp_warehouse_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		land_morale = 0.1
		levy_reinforce_rate = 0.1
		retinuesize = 200
		
		extra_tech_building_start = 1.0
	}
	
	# Palace Archive
	fp_warehouse_2 = {
		desc = fp_warehouse_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		upgrades_from = fp_warehouse_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 99
		
		stewardship = 1
		land_morale = 0.2
		levy_reinforce_rate = 0.2
		retinuesize = 400
		
		extra_tech_building_start = 2.5
	}
	
	# Administrative Office
	fp_warehouse_3 = {
		desc = fp_warehouse_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		upgrades_from = fp_warehouse_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 98
		
		stewardship = 1
		land_morale = 0.3
		levy_reinforce_rate = 0.3
		retinuesize = 600
		
		extra_tech_building_start = 4.0
	}
	
	# Palace Garden
	fp_garden_1 = {
		desc = fp_garden_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		monthly_character_prestige = 0.20
		
		extra_tech_building_start = 1.0
	}
	
	# Scenic Pond
	fp_garden_2 = {
		desc = fp_garden_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		ai_creation_factor = 99

		upgrades_from = fp_garden_1
		prerequisites = { fp_mansion_2 }

		diplomacy = 1
		monthly_character_prestige = 0.30
		
		extra_tech_building_start = 2.5
	}
	
	# Hedge Maze
	fp_garden_3 = {
		desc = fp_garden_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		ai_creation_factor = 98

		upgrades_from = fp_garden_2
		prerequisites = { fp_mansion_3 }

		diplomacy = 1
		monthly_character_prestige = 0.50
		
		extra_tech_building_start = 4.0
	}
	
	# Wine Cellar
	fp_cellar_1 = {
		desc = fp_cellar_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		fertility = 0.1
		
		extra_tech_building_start = 1.0
	}
	
	# Catacombs
	fp_cellar_2 = {
		desc = fp_cellar_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		ai_creation_factor = 99

		upgrades_from = fp_cellar_1
		prerequisites = { fp_mansion_2 }
		
		martial = 1
		monthly_character_piety = 0.25
		
		extra_tech_building_start = 2.5
	}
	
	# Dungeon Complex
	fp_cellar_3 = {
		desc = fp_cellar_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		ai_creation_factor = 98
		
		upgrades_from = fp_cellar_2
		prerequisites = { fp_mansion_3 }
		
		martial = 1
		monthly_character_prestige = 0.25
		
		extra_tech_building_start = 4.0
	}
	
	# Secluded Shrine
	fp_shrine_1 = {
		desc = fp_shrine_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		church_opinion = 10
		monthly_character_piety = 0.10
		
		extra_tech_building_start = 1.0
	}
	
	# Private Art Collection
	fp_shrine_2 = {
		desc = fp_shrine_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		upgrades_from = fp_shrine_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 99
		
		learning = 1
		monthly_character_piety = 0.25
		
		extra_tech_building_start = 2.5
	}
	
	# Grand Library
	fp_shrine_3 = {
		desc = fp_shrine_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		upgrades_from = fp_shrine_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 98
		
		learning = 1
		monthly_character_piety = 0.50
		
		extra_tech_building_start = 4.0
	}
	
	# Fortified Vault
	fp_vault_1 = {
		desc = fp_vault_1_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 150
		build_time = 730
		ai_creation_factor = 100
		
		tax_income = 4
		
		extra_tech_building_start = 1.0
	}
	
	# Secret Passages
	fp_vault_2 = {
		desc = fp_vault_2_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 250
		build_time = 1095
		upgrades_from = fp_vault_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 99
		
		tax_income = 5
		intrigue = 1
		
		extra_tech_building_start = 2.5
	}
	
	# Hidden Chamber
	fp_vault_3 = {
		desc = fp_vault_3_desc
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		build_cost = 350
		build_time = 1460
		upgrades_from = fp_vault_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 98
		
		tax_income = 6
		intrigue = 1
		
		extra_tech_building_start = 4.0
	}
}
